package hcn.protocol.ods.paymentXML;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;

/**
 * Created by ChenJij on 2021/9/14.
 */
@XmlRootElement(name = "Data")
public class GetUsableVoucherListResp {
    //<Data>
    //            <Msg>success</Msg>
    //            <Code>200</Code>
    //            <Body>
    //                <Voucher>
    //                    <BeginDate>2021-09-16 00:00:00</BeginDate>
    //                    <Times>1</Times>
    //                    <VoucherName>大换药</VoucherName>
    //                    <EndDate>2022-09-15 00:00:00</EndDate>
    //                    <VoucherId>11763</VoucherId>
    //                    <Price>10</Price>
    //                </Voucher>
    //                <Voucher>
    //                    <BeginDate>2021-09-16 00:00:00</BeginDate>
    //                    <Times>1</Times>
    //                    <VoucherName>中换药</VoucherName>
    //                    <EndDate>2022-09-15 00:00:00</EndDate>
    //                    <VoucherId>11764</VoucherId>
    //                    <Price>6</Price>
    //                </Voucher>
    //            </Body>
    //        </Data>
    private String code;
    private String msg;
    private List<Voucher> voucherList;

    @XmlElement(name = "Code")
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @XmlElement(name = "Msg")
    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @XmlElementWrapper(name = "VoucherList")
    @XmlElement(name = "Voucher")
    public List<Voucher> getVoucherList() {
        return voucherList;
    }

    public void setVoucherList(List<Voucher> voucherList) {
        this.voucherList = voucherList;
    }

    public static class Voucher {
        //有效开始日期
        private String beginDate;
        //可用次数
        private String times;
        //券名称
        private String voucherName;
        //有效结束日期
        private String endDate;
        //券标识
        private String voucherId;
        //抵用金额
        private String price;
        //服务项编码
        private String itemCode;

        @XmlElement(name = "BeginDate")
        public String getBeginDate() {
            return beginDate;
        }

        public void setBeginDate(String beginDate) {
            this.beginDate = beginDate;
        }

        @XmlElement(name = "Times")
        public String getTimes() {
            return times;
        }

        public void setTimes(String times) {
            this.times = times;
        }

        @XmlElement(name = "VoucherName")
        public String getVoucherName() {
            return voucherName;
        }

        public void setVoucherName(String voucherName) {
            this.voucherName = voucherName;
        }

        @XmlElement(name = "EndDate")
        public String getEndDate() {
            return endDate;
        }

        public void setEndDate(String endDate) {
            this.endDate = endDate;
        }

        @XmlElement(name = "VoucherId")
        public String getVoucherId() {
            return voucherId;
        }

        public void setVoucherId(String voucherId) {
            this.voucherId = voucherId;
        }

        @XmlElement(name = "Price")
        public String getPrice() {
            return price;
        }

        public void setPrice(String price) {
            this.price = price;
        }

        @XmlElement(name = "ItemCode")
        public String getItemCode() {
            return itemCode;
        }

        public void setItemCode(String itemCode) {
            this.itemCode = itemCode;
        }
    }
}